Package-level declarations

Types

Link copied to clipboard
Annotation that can be added to an @Action method to indicate that its execution achieves a goal See com.embabel.agent.core.Goal for more details.
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class Action(val description: String = "", val pre: Array<String> = [], val post: Array<String> = [], val canRerun: Boolean = false, val outputBinding: String = IoBinding.DEFAULT_BINDING, val cost: <Error class: unknown class> = 0.0, val value: <Error class: unknown class> = 0.0, val toolGroups: Array<String> = [], val toolGroupRequirements: Array<ToolGroup> = [])

Annotation to indicate a method implementing an Action. Methods can have any number of parameters, which represent necessary input types. Methods can return any type. The return type will become an effect.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Agent(val name: String = "", val provider: String = "", val description: String, val version: String = DEFAULT_VERSION, val planner: Planner = Planner.GOAP, val scan: Boolean = true, val beanName: String = "", val opaque: Boolean = false)

Indicates that this class is an agent. It doesn't just contribute actions, goals and conditions: it is an agent in itself. This is a Spring stereotype annotation, so annotated classes will be picked up on the classpath and injected Either @Agent or @AgentCapabilities should be used: not both

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class AgentCapabilities(val scan: Boolean = true)

Indicates that this class exposes actions, goals and conditions that may be used by agents, but is not an agent in itself. This is a Spring stereotype annotation, so annotated classes will be picked up on the classpath and injected

Link copied to clipboard

Not an error, but gets special treatment in the platform.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class Condition(val name: String = "", val cost: <Error class: unknown class> = 0.0)

Annotates a method that evaluates a condition. This will have access to the processContext and also can use any other state.

Link copied to clipboard
annotation class Export
How a goal should be exposed
Link copied to clipboard

Specifies the type of planner that an agent uses.

Link copied to clipboard
annotation class RequireNameMatch

Annotation that can added to parameters of an @Action method to indicate that the parameter name must match the input binding. Otherwise, it can match the latest ("it") value. Must be combined with the outputBinding method on Action for the action producing the input

Link copied to clipboard
annotation class ToolGroup(val role: String)
Link copied to clipboard
open class WaitFor
Java syntax sugar for HITL

Functions

Link copied to clipboard
fun <P : Any> confirm(what: P, description: String): P
Link copied to clipboard
inline fun <P : Any> fromForm(title: String): P

fun <P : Any> fromForm(title: String? = null, dataClass: Class<P>): P

Bind input to the data class

Link copied to clipboard
fun <P : Any> waitFor(awaitable: Awaitable<P, *>): P

Call when the current AgentProcess should wait for a response from the user.